<!DOCTYPE html>

<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<title>全景图</title>
<meta name="viewport" content="initial-scale=1.0,maximum-scale=1,user-scalable=no">
<meta name="apple-touch-fullscreen" content="YES">
<meta name="apple-mobile-web-app-capable" content="yes">
</head>
<body>
<style type="text/css">

body{ background-color: #313131; padding:0; margin:0; }
.imgBox { 
	display: block;
	text-align:center;
}
.imgBox img{ vertical-align:middle; margin:0 auto; }
.imgBox a{
	position:fixed;
	top:0;
	right:0;
	width:48px;
	height:48px;
	display:block;
	z-index:2;
	text-align:center;
	display:none;
}


</style>
<div class="imgBox" id="imgBox">
<img src="{$_W['attachurl']}{$image['url']}" id="img" style="margin-top: 49.5px;">
<a style="display:block;positon:fixed;left:0px;top:0px;" href="{php echo $this->createMobileUrl('brand',array("bid"=>$bid))}"><img src="../addons/mon_brand/images/back.png" width="48" height="48"></a>
<div style=" position:fixed; left:0; bottom:0; height:0; background-color:#313131; display:none;"></div>
</div>
<div id="activity_id" style="display:none;">2651</div>
<div id="channel_id" style="display:none;">0</div>
<script type="text/javascript" src="../addons/mon_brand/js/jquery-1.7.2.min.js"></script>

<script type="text/javascript">
$(document).ready(function(){
	var h = document.documentElement.clientHeight;
	var imgH = $('#img').height();
	// 图片过小，居中显示
	if( imgH != 0 && (h-imgH) > 0 ){
		$('#img').css('margin-top', (h-imgH)/2);
	}

	var activity_id = document.getElementById('activity_id').innerHTML;
	/*
	$.ajax({
		   type: "get",
		   url: "/analyseplugin/plugin?activity_id= " + activity_id + "&plugtype=info_fullview",
		   dataType: "json",
		   success: function(msg){
			   if(msg.result==1){
				   //alert('操作成功！');
				}else{
					//alert("操作失败，" + msg.msg);
				}
		   }
		});*/
}

);

var img;
window.onload=function(){
	img = new Image(); 
	img.src = $('#img').attr('src');
};
$('#img').ready(function(){
	if(navigator.userAgent.match(/Android.*/i)){
		var nowHeight=$(window).height();
		setTimeout(function(){
			var heightPercent=img.height/nowHeight;
			var widthPercent=img.width/640;
			$('#img').css('min-height',heightPercent*100+'%');
			$('#img').css('min-width',widthPercent*100+'%');
			},400)
		}
})
</script></body></html>